import { request } from "@/utils/request.js"
/**
 * 我的订单列表
 * @param {*} data 
 * @returns Promise
 */
export function getOrder(data) {
	return request({ url: "/orderInfo/getOrder", data })
}

/**
 * 创建工号
 * @param {*} data 
 * @returns Promise
 */
export function createOrder(data) {
	return request({ url: "/proxyWorkCode/create", data, method: 'POST' })
}

/**
 * 获取工号
 * @param {*} data 
 * @returns Promise
 */
export function getCodeList(data) {
	return request({ url: "/proxyWorkCode/getList", data, method: 'POST' })
}

/**
 * 获取工号下已办理的手机号列表
 * @param {*} data 
 * @returns Promise
 */
export function getSubmitHistory(data) {
	return request({ url: "/orderInfoProxy/getSubmitHistory", data, method: 'POST' })
}

/**
 * 新增结算
 * @param {*} data 
 * @returns Promise
 */
export function addOrder(data) {
	return request({ url: "/orderInfoProxy/add", data, method: 'POST' })
}

/**
 * 获取待接单/已接单/已完成/已移交订单列表(状态 0=待接单 1=已接单 2=已处理 3=已转交)
 * @param {*} data 
 * @returns Promise
 */
export function getList(data) {
	return request({ url: "/orderInfo/getList", data, method: 'POST' })
}

/**
 * 检测是否已经确认过
 * @param {*} data 
 * @returns Promise
 */
export function checkSure(data) {
	return request({ url: "/orderInfoProxyStatistic/checkSure", data, method: 'POST' })
}

/**
 * 获取我的结算订单(审核中/已同意/已拒绝)
 * @param {*} data 
 * @returns Promise
 */
export function myOrder(data) {
	return request({ url: "/orderInfoProxy/myOrder", data, method: 'POST' })
}

/**
 * 确认无异
 * @param {*} data 
 * @returns Promise
 */
export function sure(data) {
	return request({ url: "/orderInfoProxyStatistic/sure", data, method: 'POST' })
}

/**
 * 重新提交
 * @param {*} data 
 * @returns Promise
 */
export function reAdd(data) {
	return request({ url: "/orderInfoProxy/reAdd", data, method: 'POST' })
}

/**
 * 订单完成
 * @param {*} data 
 * @returns Promise
 */
export function finish(data) {
	return request({ url: "/orderInfo/finish", data, method: 'POST' })
}

/**
 * 订单移交
 * @param {*} data 
 * @returns Promise
 */
export function transfer(data) {
	return request({ url: "/orderInfo/transfer", data, method: 'POST' })
}

/**
 * 接单
 * @param {*} data 
 * @returns Promise
 */
export function accept(data) {
	return request({ url: "/orderInfo/accept", data, method: 'POST' })
}

/**
 * 删除工号下已办理的手机号列表
 * @param {*} data 
 * @returns Promise
 */
export function removeSubmitHistory(data) {
	return request({ url: "/orderInfoProxy/removeSubmitHistory", data, method: 'POST' })
}